Skip to contentSkip to conversation

VM fault with kernel 4.7-rc1 on Alien: Isolation

Bug 96360 [email protected] 1 participant 16 messages Jun 3, 2016 – Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=96360

Bug ID: 96360
Summary: VM fault with kernel 4.7-rc1 on Alien: Isolation
Product: DRI
Version: DRI git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/Radeon
Assignee: [email protected]
Reporter: [email protected]

Created attachment 124312
--> https://bugs.freedesktop.org/attachment.cgi?id=124312&action=edit
VM faults in dmesg triggered by Alien: Isolation

Hi,

I've recently begun playing Alien: Isolation now that the compute shaders are available when combining latest Mesa with a 4.7-git kernel. However, my computer freezes after sometime. Poking dmesg got me a repeating VM fault which goes on as long as I'm in the game (playing, not the menu or while loading).

Setup:
GPU -> R9 280X
Kernel -> 4.7-rc1
Distribution -> Archlinux 64
Mesa, drm, ddx -> using latest code from git repositories

I'll try with a 4.6 kernel to see if this bug was introduced in or exposed by the 4.7 branch.

Attaching dmesg

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #1 from Alexandre Demers <[email protected]> --- So this is the commit that exposes the bug.

3d02b7fee9c3ece1746f5b06c4143b511383fc6b is the first bad commit commit 3d02b7fee9c3ece1746f5b06c4143b511383fc6b

Author: Bas Nieuwenhuizen <[email protected]>
Date:   Fri Apr 15 02:47:49 2016 +0200

drm/radeon: Allow setting shader registers using DMA/COPY packet3 on SI.

Mesa uses a COPY_DATA packet to copy the grid size for indirect dispatches into COMPUTE_USER_DATA_*.

Setting those registers with a SET_SH_REG packet is allowed, not allowing them with other packets seems like an oversight.

v2: Clarify commit message.

:040000 040000 ec4d58f4c4e5bd746474776c852a7c70763183a7
8ba67a00f061b454d1600838bf620e1e937e9461 M drivers

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

Alexandre Demers <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|VM fault with kernel        |[bisected] VM fault with
                   |4.7-rc1 on Alien: Isolation |kernel 4.7-rc1 on Alien:
                   |                            |Isolation
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

Alexandre Demers <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|[bisected] VM fault with    |[bisected: 3d02b7] VM fault
                   |kernel 4.7-rc1 on Alien:    |with kernel 4.7-rc1 on
                   |Isolation                   |Alien: Isolation
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #4 from Alexandre Demers <[email protected]> --- (In reply to Nicolai Hähnle from comment #3)

Quoted 1 line

Can you provide an apitrace that reproduces the VM faults?

I'll do that later. However, it may end up as a big apitrace since it takes a lot of time before being able to actually play de game, which is when the VM faults appear. I'll figure out a way of putting a link.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #5 from Nicolai Hähnle <[email protected]> --- Thanks, that would be much appreciated. Most people tend to use Google Drive - I've downloaded GB-sized traces from there.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #6 from Alexandre Demers <[email protected]> --- And here is the trace that you can download from Google Drive (I hope it works correctly):
https://drive.google.com/open?id=0Bw_tZdWsNa4BV0VKMGVaeFBDaEE

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #7 from Nicolai Hähnle <[email protected]> --- Thanks! No VM faults here on Tonga, so this may be specific to SI. Do you get VM faults in dmesg when you play the trace back on your system?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #8 from Alexandre Demers <[email protected]> --- (In reply to Nicolai Hähnle from comment #7)

Quoted 2 lines

Thanks! No VM faults here on Tonga, so this may be specific to SI. Do you get VM faults in dmesg when you play the trace back on your system?

Yes it does, I just tested it with the trace I've shared with you.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #9 from Alexandre Demers <[email protected]> --- (In reply to Nicolai Hähnle from comment #7)

Quoted 2 lines

Thanks! No VM faults here on Tonga, so this may be specific to SI. Do you get VM faults in dmesg when you play the trace back on your system?

Anything I can provide you with? Any specific test or steps?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #10 from Nicolai Hähnle <[email protected]> --- No, thank you. I can reproduce this on a Verde, so it does seem to be SI-specific (perhaps also CI) or perhaps a radeon vs. amdgpu issue.

I've seen a VM fault even with GALLIUM_DDEBUG=800 (i.e. frequent flushes) happen at

901138 @3 glDispatchCompute(num_groups_x = 128, num_groups_y = 2, num_groups_z = 1)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #11 from Nicolai Hähnle <[email protected]> --- Created attachment 124514
--> https://bugs.freedesktop.org/attachment.cgi?id=124514&action=edit
preliminary patch

Problem understood - we're generating bad shader code - though I still need to double-check all the possible corner cases.

In the meantime, the attached patch for LLVM should fix Alien: Isolation.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

Nicolai Hähnle <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Nicolai Hähnle <[email protected]> --- Fixed in LLVM r272761.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=96360

--- Comment #13 from Alexandre Demers <[email protected]> --- (In reply to Nicolai Hähnle from comment #12)

Quoted 1 line

Fixed in LLVM r272761.

Thank you, I'll test it later today.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel